<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@include file="../common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/page.css">

	<title> <spring:message code="class.page.title"/></title>

    <script type="text/javascript" src="${pageContext.request.contextPath}/static/zTree3.3/js/jquery.ztree.core-3.5.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/zTree3.3/js/jquery.ztree.excheck-3.5.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/zTree3.3/css/zTreeStyle/zTreeStyle.css" type="text/css">


	<script type="text/javascript">
		var _gridWidth;
		var _gridHeight;
		//页面自适应
		function resizePageSize(){
			_gridWidth = $(document).width()-12;/*  -189 是去掉左侧 菜单的宽度，   -12 是防止浏览器缩小页面 出现滚动条 恢复页面时  折行的问题 */
			_gridHeight = $(document).height()-32-80; /* -32 顶部主菜单高度，   -90 查询条件高度*/
		}


        $(function(){

            $("#shouquanBtn").click(function( event ) {

                $.ajax({
                    type : 'POST',
                    url : '${pageContext.request.contextPath}/gdpinfo/queryFileInfoZtreeList',
                    dataType : 'json',
                    cache : false,
                    data : [],
                    success : function(data) {
                        console.log(data);
                        $.fn.zTree.init($("#roleTreeID"), setting, data);
                    },
                    error : function() {
                        message("<spring:message code='common.error'/>");
                    }
                });
            });

            var setting = {
                check: {
                    enable: false
                },
                data: {
                    simpleData: {
                        enable: true
                    }
                },
                callback : {
                    onClick : onClickNode
                }
            };

        });

    </script>


</head>
<body style="display: flex;flex-direction: column">

<a href="#" id="shouquanBtn" class="ui-state-default ui-corner-all cbe-button"><span class="ui-icon ui-icon-plus"></span><spring:message code="role.authorization"/></a>


<ul id="roleTreeID" class="ztree" style="width:230px; overflow:auto;"></ul>


</body>
</html>